Dew Stats for .NET
|
Simple linear regression.
The routine fits equations to data by minimizing the sum of squared residuals:
SS = Sum [y(k) - ycalc(k)]^2 ,
where y(k) and ycalc(k) are respectively the observed and calculated value of the dependent variable for observation k. ycalc(k) is a function of the regression parameters b(0) and b(1). In case constant term is used, the observed values obey the following equation:
y(k) = b(0) + b(1) * x
i.e
Y = b(0) + b(1)*X.
or if constant term is NOT used:
y(k) = b(0) * x
To calculate additional regression statistical parameters, use RegressTest routine.
The following example loads data for simple linear regression (line equation) and then extracts line parameters b(0)=n and b(1)=k:
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|